<?php
require_once("includes/global.inc");
global $SQLITE_FILENAME;
$sqlite = new SQLite3($SQLITE_FILENAME);
$sqlite->exec("CREATE TABLE IF NOT EXISTS foo (bar varchar(10))");
$sqlite->exec("INSERT INTO foo values('test')");
$result = $sqlite->query("select * from foo");
while ($row = $result->fetchArray()) {
    var_dump($row);
}